<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>复杂的自定义 | Ranorex Studio用户手册</title>
    <meta name="generator" content="VuePress 1.8.0">
    <link rel="icon" href="/ranorex/img/favicon.ico">
    <script data-ad-client="ca-pub-7828333725993554" async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <meta name="description" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="keywords" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="baidu-site-verification" content="7F55weZDDc">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/ranorex/assets/css/0.styles.4f9f6236.css" as="style"><link rel="preload" href="/ranorex/assets/js/app.24b7eaa5.js" as="script"><link rel="preload" href="/ranorex/assets/js/2.ec9fdd2b.js" as="script"><link rel="preload" href="/ranorex/assets/js/57.cc924439.js" as="script"><link rel="prefetch" href="/ranorex/assets/js/10.10740124.js"><link rel="prefetch" href="/ranorex/assets/js/100.e7028cb5.js"><link rel="prefetch" href="/ranorex/assets/js/101.57840c4c.js"><link rel="prefetch" href="/ranorex/assets/js/102.f88ac37b.js"><link rel="prefetch" href="/ranorex/assets/js/103.3f4ef0af.js"><link rel="prefetch" href="/ranorex/assets/js/104.1c3987fc.js"><link rel="prefetch" href="/ranorex/assets/js/105.39bd6f16.js"><link rel="prefetch" href="/ranorex/assets/js/106.6d99777c.js"><link rel="prefetch" href="/ranorex/assets/js/107.a772dfce.js"><link rel="prefetch" href="/ranorex/assets/js/108.1f6106fd.js"><link rel="prefetch" href="/ranorex/assets/js/109.61465bce.js"><link rel="prefetch" href="/ranorex/assets/js/11.15aa2ac8.js"><link rel="prefetch" href="/ranorex/assets/js/110.87f08865.js"><link rel="prefetch" href="/ranorex/assets/js/111.6de4977a.js"><link rel="prefetch" href="/ranorex/assets/js/112.ac81b438.js"><link rel="prefetch" href="/ranorex/assets/js/113.e4324abb.js"><link rel="prefetch" href="/ranorex/assets/js/114.76da90e6.js"><link rel="prefetch" href="/ranorex/assets/js/115.b0302cf5.js"><link rel="prefetch" href="/ranorex/assets/js/116.dc9013d8.js"><link rel="prefetch" href="/ranorex/assets/js/117.5650909e.js"><link rel="prefetch" href="/ranorex/assets/js/118.83c3ad11.js"><link rel="prefetch" href="/ranorex/assets/js/119.99ea8a2f.js"><link rel="prefetch" href="/ranorex/assets/js/12.f887e0d3.js"><link rel="prefetch" href="/ranorex/assets/js/120.5158a9fc.js"><link rel="prefetch" href="/ranorex/assets/js/121.cd6389de.js"><link rel="prefetch" href="/ranorex/assets/js/122.30b6e23a.js"><link rel="prefetch" href="/ranorex/assets/js/123.14ef94d2.js"><link rel="prefetch" href="/ranorex/assets/js/124.774c039f.js"><link rel="prefetch" href="/ranorex/assets/js/125.ec98d72a.js"><link rel="prefetch" href="/ranorex/assets/js/126.a5374d41.js"><link rel="prefetch" href="/ranorex/assets/js/127.6bb71a7f.js"><link rel="prefetch" href="/ranorex/assets/js/128.dddf9e5d.js"><link rel="prefetch" href="/ranorex/assets/js/129.803e1198.js"><link rel="prefetch" href="/ranorex/assets/js/13.98375c72.js"><link rel="prefetch" href="/ranorex/assets/js/130.7fe218d8.js"><link rel="prefetch" href="/ranorex/assets/js/131.ccdb53c7.js"><link rel="prefetch" href="/ranorex/assets/js/132.f059a1a9.js"><link rel="prefetch" href="/ranorex/assets/js/133.4108c727.js"><link rel="prefetch" href="/ranorex/assets/js/134.9d680a15.js"><link rel="prefetch" href="/ranorex/assets/js/135.6a9d4859.js"><link rel="prefetch" href="/ranorex/assets/js/136.2198a58d.js"><link rel="prefetch" href="/ranorex/assets/js/137.ee7cb289.js"><link rel="prefetch" href="/ranorex/assets/js/138.26c7e792.js"><link rel="prefetch" href="/ranorex/assets/js/139.eeb24972.js"><link rel="prefetch" href="/ranorex/assets/js/14.45cccdbd.js"><link rel="prefetch" href="/ranorex/assets/js/140.7ec1802a.js"><link rel="prefetch" href="/ranorex/assets/js/141.fb7a23f0.js"><link rel="prefetch" href="/ranorex/assets/js/142.6749eff4.js"><link rel="prefetch" href="/ranorex/assets/js/143.431594af.js"><link rel="prefetch" href="/ranorex/assets/js/144.a2f5ce52.js"><link rel="prefetch" href="/ranorex/assets/js/145.0601585d.js"><link rel="prefetch" href="/ranorex/assets/js/146.16feb8bc.js"><link rel="prefetch" href="/ranorex/assets/js/147.5053e695.js"><link rel="prefetch" href="/ranorex/assets/js/148.a353c0d0.js"><link rel="prefetch" href="/ranorex/assets/js/149.31c0ff28.js"><link rel="prefetch" href="/ranorex/assets/js/15.f23b2dea.js"><link rel="prefetch" href="/ranorex/assets/js/150.6542abfd.js"><link rel="prefetch" href="/ranorex/assets/js/151.43e948e3.js"><link rel="prefetch" href="/ranorex/assets/js/152.dd6cabb1.js"><link rel="prefetch" href="/ranorex/assets/js/153.f014da37.js"><link rel="prefetch" href="/ranorex/assets/js/154.6ee45ca5.js"><link rel="prefetch" href="/ranorex/assets/js/155.6ba5415a.js"><link rel="prefetch" href="/ranorex/assets/js/156.e601c1e5.js"><link rel="prefetch" href="/ranorex/assets/js/157.407e013c.js"><link rel="prefetch" href="/ranorex/assets/js/158.0bb7c774.js"><link rel="prefetch" href="/ranorex/assets/js/159.17154eef.js"><link rel="prefetch" href="/ranorex/assets/js/16.5154513b.js"><link rel="prefetch" href="/ranorex/assets/js/160.9d4cb6ba.js"><link rel="prefetch" href="/ranorex/assets/js/161.a53a87be.js"><link rel="prefetch" href="/ranorex/assets/js/162.54b97f63.js"><link rel="prefetch" href="/ranorex/assets/js/163.546cbc2d.js"><link rel="prefetch" href="/ranorex/assets/js/164.7bc339ce.js"><link rel="prefetch" href="/ranorex/assets/js/165.67d4304a.js"><link rel="prefetch" href="/ranorex/assets/js/166.7c1be565.js"><link rel="prefetch" href="/ranorex/assets/js/167.bd0167b7.js"><link rel="prefetch" href="/ranorex/assets/js/168.1aa7878a.js"><link rel="prefetch" href="/ranorex/assets/js/169.d90b4e9c.js"><link rel="prefetch" href="/ranorex/assets/js/17.5fcd13ca.js"><link rel="prefetch" href="/ranorex/assets/js/170.cb5db4fb.js"><link rel="prefetch" href="/ranorex/assets/js/171.b8147650.js"><link rel="prefetch" href="/ranorex/assets/js/172.53f22d79.js"><link rel="prefetch" href="/ranorex/assets/js/173.0e60c801.js"><link rel="prefetch" href="/ranorex/assets/js/174.8c29f5a4.js"><link rel="prefetch" href="/ranorex/assets/js/175.caa398e0.js"><link rel="prefetch" href="/ranorex/assets/js/176.36e20920.js"><link rel="prefetch" href="/ranorex/assets/js/177.1b8ca17e.js"><link rel="prefetch" href="/ranorex/assets/js/178.686cd676.js"><link rel="prefetch" href="/ranorex/assets/js/179.62ed8882.js"><link rel="prefetch" href="/ranorex/assets/js/18.3410087d.js"><link rel="prefetch" href="/ranorex/assets/js/180.a0a2165c.js"><link rel="prefetch" href="/ranorex/assets/js/181.8af8faa3.js"><link rel="prefetch" href="/ranorex/assets/js/182.dc2e7167.js"><link rel="prefetch" href="/ranorex/assets/js/183.ef7688da.js"><link rel="prefetch" href="/ranorex/assets/js/184.5707a5ec.js"><link rel="prefetch" href="/ranorex/assets/js/185.72e933f8.js"><link rel="prefetch" href="/ranorex/assets/js/186.ac3e0f9e.js"><link rel="prefetch" href="/ranorex/assets/js/187.703ef8ea.js"><link rel="prefetch" href="/ranorex/assets/js/188.d04772eb.js"><link rel="prefetch" href="/ranorex/assets/js/189.549c54cf.js"><link rel="prefetch" href="/ranorex/assets/js/19.f5a747d2.js"><link rel="prefetch" href="/ranorex/assets/js/190.a7fb60b7.js"><link rel="prefetch" href="/ranorex/assets/js/191.0b9e402d.js"><link rel="prefetch" href="/ranorex/assets/js/192.db701f56.js"><link rel="prefetch" href="/ranorex/assets/js/193.86245113.js"><link rel="prefetch" href="/ranorex/assets/js/194.26dcdaa9.js"><link rel="prefetch" href="/ranorex/assets/js/195.341ac6b9.js"><link rel="prefetch" href="/ranorex/assets/js/196.e12e179b.js"><link rel="prefetch" href="/ranorex/assets/js/197.604689a4.js"><link rel="prefetch" href="/ranorex/assets/js/198.2e49a4fc.js"><link rel="prefetch" href="/ranorex/assets/js/199.a1811557.js"><link rel="prefetch" href="/ranorex/assets/js/20.fcd6c62f.js"><link rel="prefetch" href="/ranorex/assets/js/200.bbfc3813.js"><link rel="prefetch" href="/ranorex/assets/js/201.dfbdd0b3.js"><link rel="prefetch" href="/ranorex/assets/js/202.4d01f6a5.js"><link rel="prefetch" href="/ranorex/assets/js/203.2fc1b32a.js"><link rel="prefetch" href="/ranorex/assets/js/204.a18e0686.js"><link rel="prefetch" href="/ranorex/assets/js/205.8559eb21.js"><link rel="prefetch" href="/ranorex/assets/js/206.febc4af9.js"><link rel="prefetch" href="/ranorex/assets/js/207.3824dcf1.js"><link rel="prefetch" href="/ranorex/assets/js/208.60a33728.js"><link rel="prefetch" href="/ranorex/assets/js/209.d933f506.js"><link rel="prefetch" href="/ranorex/assets/js/21.cf8fbb66.js"><link rel="prefetch" href="/ranorex/assets/js/210.8f377e06.js"><link rel="prefetch" href="/ranorex/assets/js/211.26f8be02.js"><link rel="prefetch" href="/ranorex/assets/js/212.4a64d44c.js"><link rel="prefetch" href="/ranorex/assets/js/213.fdeb4f41.js"><link rel="prefetch" href="/ranorex/assets/js/214.e34e9a0b.js"><link rel="prefetch" href="/ranorex/assets/js/215.ce7a5ee6.js"><link rel="prefetch" href="/ranorex/assets/js/216.660d864f.js"><link rel="prefetch" href="/ranorex/assets/js/217.b9b06dc0.js"><link rel="prefetch" href="/ranorex/assets/js/218.1c9eb327.js"><link rel="prefetch" href="/ranorex/assets/js/219.9f170a55.js"><link rel="prefetch" href="/ranorex/assets/js/22.148be82a.js"><link rel="prefetch" href="/ranorex/assets/js/220.15dc816e.js"><link rel="prefetch" href="/ranorex/assets/js/221.80b3442a.js"><link rel="prefetch" href="/ranorex/assets/js/222.704d161c.js"><link rel="prefetch" href="/ranorex/assets/js/223.1145a930.js"><link rel="prefetch" href="/ranorex/assets/js/224.f1da1ddc.js"><link rel="prefetch" href="/ranorex/assets/js/225.fa6a9452.js"><link rel="prefetch" href="/ranorex/assets/js/226.18a3865a.js"><link rel="prefetch" href="/ranorex/assets/js/23.cc718ca8.js"><link rel="prefetch" href="/ranorex/assets/js/24.86da407f.js"><link rel="prefetch" href="/ranorex/assets/js/25.f55794a8.js"><link rel="prefetch" href="/ranorex/assets/js/26.034daa9c.js"><link rel="prefetch" href="/ranorex/assets/js/27.2fbbd462.js"><link rel="prefetch" href="/ranorex/assets/js/28.211c41f6.js"><link rel="prefetch" href="/ranorex/assets/js/29.04c0999c.js"><link rel="prefetch" href="/ranorex/assets/js/3.ae597d9c.js"><link rel="prefetch" href="/ranorex/assets/js/30.393ae7bc.js"><link rel="prefetch" href="/ranorex/assets/js/31.c8ad9771.js"><link rel="prefetch" href="/ranorex/assets/js/32.77f25c7a.js"><link rel="prefetch" href="/ranorex/assets/js/33.893cd8eb.js"><link rel="prefetch" href="/ranorex/assets/js/34.ad372005.js"><link rel="prefetch" href="/ranorex/assets/js/35.8b8dfbb2.js"><link rel="prefetch" href="/ranorex/assets/js/36.d4e0c135.js"><link rel="prefetch" href="/ranorex/assets/js/37.616da736.js"><link rel="prefetch" href="/ranorex/assets/js/38.2432a079.js"><link rel="prefetch" href="/ranorex/assets/js/39.8b943467.js"><link rel="prefetch" href="/ranorex/assets/js/4.22fd3e1a.js"><link rel="prefetch" href="/ranorex/assets/js/40.e8eaccc8.js"><link rel="prefetch" href="/ranorex/assets/js/41.76a9eede.js"><link rel="prefetch" href="/ranorex/assets/js/42.89ea171c.js"><link rel="prefetch" href="/ranorex/assets/js/43.f856cbbb.js"><link rel="prefetch" href="/ranorex/assets/js/44.58030fb1.js"><link rel="prefetch" href="/ranorex/assets/js/45.3d09c2fa.js"><link rel="prefetch" href="/ranorex/assets/js/46.b245fc56.js"><link rel="prefetch" href="/ranorex/assets/js/47.bc3b2fa7.js"><link rel="prefetch" href="/ranorex/assets/js/48.b46f224f.js"><link rel="prefetch" href="/ranorex/assets/js/49.4cb3377b.js"><link rel="prefetch" href="/ranorex/assets/js/5.02a8399a.js"><link rel="prefetch" href="/ranorex/assets/js/50.202bba60.js"><link rel="prefetch" href="/ranorex/assets/js/51.70007468.js"><link rel="prefetch" href="/ranorex/assets/js/52.cb4cc59e.js"><link rel="prefetch" href="/ranorex/assets/js/53.8eb695b2.js"><link rel="prefetch" href="/ranorex/assets/js/54.f840fad6.js"><link rel="prefetch" href="/ranorex/assets/js/55.3a7ca993.js"><link rel="prefetch" href="/ranorex/assets/js/56.e54f166f.js"><link rel="prefetch" href="/ranorex/assets/js/58.1b6a4239.js"><link rel="prefetch" href="/ranorex/assets/js/59.6e538365.js"><link rel="prefetch" href="/ranorex/assets/js/6.4754e26a.js"><link rel="prefetch" href="/ranorex/assets/js/60.24be2f8a.js"><link rel="prefetch" href="/ranorex/assets/js/61.37707aa9.js"><link rel="prefetch" href="/ranorex/assets/js/62.3f142075.js"><link rel="prefetch" href="/ranorex/assets/js/63.ffca709a.js"><link rel="prefetch" href="/ranorex/assets/js/64.71472536.js"><link rel="prefetch" href="/ranorex/assets/js/65.5a22e1db.js"><link rel="prefetch" href="/ranorex/assets/js/66.12137ec5.js"><link rel="prefetch" href="/ranorex/assets/js/67.216d94c5.js"><link rel="prefetch" href="/ranorex/assets/js/68.b547be06.js"><link rel="prefetch" href="/ranorex/assets/js/69.500ef0be.js"><link rel="prefetch" href="/ranorex/assets/js/7.8d47de9d.js"><link rel="prefetch" href="/ranorex/assets/js/70.17ab2354.js"><link rel="prefetch" href="/ranorex/assets/js/71.becd4c9d.js"><link rel="prefetch" href="/ranorex/assets/js/72.0a81c3ac.js"><link rel="prefetch" href="/ranorex/assets/js/73.c3f7b9bc.js"><link rel="prefetch" href="/ranorex/assets/js/74.489b5d01.js"><link rel="prefetch" href="/ranorex/assets/js/75.15b80f90.js"><link rel="prefetch" href="/ranorex/assets/js/76.37e86e91.js"><link rel="prefetch" href="/ranorex/assets/js/77.8a96a11b.js"><link rel="prefetch" href="/ranorex/assets/js/78.1089236e.js"><link rel="prefetch" href="/ranorex/assets/js/79.2d89654c.js"><link rel="prefetch" href="/ranorex/assets/js/8.197778c9.js"><link rel="prefetch" href="/ranorex/assets/js/80.6c0ca93e.js"><link rel="prefetch" href="/ranorex/assets/js/81.c09d0fd2.js"><link rel="prefetch" href="/ranorex/assets/js/82.2cf30b53.js"><link rel="prefetch" href="/ranorex/assets/js/83.6a836fd5.js"><link rel="prefetch" href="/ranorex/assets/js/84.f56aeffe.js"><link rel="prefetch" href="/ranorex/assets/js/85.fa5f1544.js"><link rel="prefetch" href="/ranorex/assets/js/86.f5d69b57.js"><link rel="prefetch" href="/ranorex/assets/js/87.5da46a4d.js"><link rel="prefetch" href="/ranorex/assets/js/88.2d708653.js"><link rel="prefetch" href="/ranorex/assets/js/89.cd2fa46c.js"><link rel="prefetch" href="/ranorex/assets/js/9.9807028d.js"><link rel="prefetch" href="/ranorex/assets/js/90.33ee88ae.js"><link rel="prefetch" href="/ranorex/assets/js/91.f157a5e7.js"><link rel="prefetch" href="/ranorex/assets/js/92.5652bd0e.js"><link rel="prefetch" href="/ranorex/assets/js/93.4adefe5e.js"><link rel="prefetch" href="/ranorex/assets/js/94.18953313.js"><link rel="prefetch" href="/ranorex/assets/js/95.87b602b5.js"><link rel="prefetch" href="/ranorex/assets/js/96.8eb960e1.js"><link rel="prefetch" href="/ranorex/assets/js/97.19ab9295.js"><link rel="prefetch" href="/ranorex/assets/js/98.3782e119.js"><link rel="prefetch" href="/ranorex/assets/js/99.23b63326.js">
    <link rel="stylesheet" href="/ranorex/assets/css/0.styles.4f9f6236.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/ranorex/" class="home-link router-link-active"><img src="/ranorex/img/RX-logo.png" alt="Ranorex Studio用户手册" class="logo"> <span class="site-name can-hide">Ranorex Studio用户手册</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>在20分钟内了解Ranorex</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Ranorex Studio</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Ranorex 录制器</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>测试套件</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>动作</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>控件库</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>测试验证</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>白名单</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>报告</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/ranorex/pages/894a89/" class="sidebar-link">介绍</a></li><li><a href="/ranorex/pages/63ffa8/" class="sidebar-link">动作和报告</a></li><li><a href="/ranorex/pages/65ed72/" class="sidebar-link">报告等级</a></li><li><a href="/ranorex/pages/6ba9cb/" class="sidebar-link">Ranorex标准报告</a></li><li><a href="/ranorex/pages/46ca5e/" class="sidebar-link">定制化报告</a></li><li><a href="/ranorex/pages/7cbc3f/" aria-current="page" class="active sidebar-link">复杂的自定义</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#示例解决方案" class="sidebar-link">示例解决方案</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#应用ranorex标准报告类" class="sidebar-link">应用Ranorex标准报告类</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#标准报告类" class="sidebar-link">标准报告类</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#用户代码录制的报告" class="sidebar-link">用户代码录制的报告</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#自定义报告策略" class="sidebar-link">自定义报告策略</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#临时定义的自定义报告类别" class="sidebar-link">临时定义的自定义报告类别</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果" class="sidebar-link">结果</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#永久定义的自定义报告类别" class="sidebar-link">永久定义的自定义报告类别</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-2" class="sidebar-link">结果</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#用户定义报告级别" class="sidebar-link">用户定义报告级别</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-3" class="sidebar-link">结果</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#格式化用户定义的报告级别" class="sidebar-link">格式化用户定义的报告级别</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#设置当前报告级别" class="sidebar-link">设置当前报告级别</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-4" class="sidebar-link">结果</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#覆盖当前报告级别" class="sidebar-link">覆盖当前报告级别</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-5" class="sidebar-link">结果</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#报告截图" class="sidebar-link">报告截图</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#报告系统摘要" class="sidebar-link">报告系统摘要</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#添加自定义数据" class="sidebar-link">添加自定义数据</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#添加自定义数据到测试数据文件" class="sidebar-link">添加自定义数据到测试数据文件</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-6" class="sidebar-link">结果</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#应用自定义数据" class="sidebar-link">应用自定义数据</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#自定义xsl文件" class="sidebar-link">自定义XSL文件</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/7cbc3f/#结果-7" class="sidebar-link">结果</a></li></ul></li></ul></li><li><a href="/ranorex/pages/c2560f/" class="sidebar-link">将报告转换为其他数据类型</a></li></ul></section></li></ul> <div class="sidebar-slot sidebar-slot-bottom"><!-- 正方形 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="3508773082"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div></aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-1cd794fe><div class="articleInfo" data-v-1cd794fe><ul class="breadcrumbs" data-v-1cd794fe><li data-v-1cd794fe><a href="/ranorex/" title="首页" class="iconfont icon-home router-link-active" data-v-1cd794fe></a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=%E5%9F%BA%E7%A1%80" title="分类" data-v-1cd794fe>基础</a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=%E6%8A%A5%E5%91%8A" title="分类" data-v-1cd794fe>报告</a></li> <!----></ul> <div class="info" data-v-1cd794fe><div title="作者" class="author iconfont icon-touxiang" data-v-1cd794fe><a href="https://github.com/taylortaurus" target="_blank" title="作者" class="beLink" data-v-1cd794fe>TaylorTaurus</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-1cd794fe><a href="javascript:;" data-v-1cd794fe>2021-11-22</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-content"></div></div></div> <h1><img src="">
          复杂的自定义
        </h1> <div class="page-slot page-slot-top"><!-- 固定100% * 90px可显示，max-height:90px未见显示-->
     <ins class="adsbygoogle"
          style="display:inline-block;width:100%;max-height:90px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6625304284"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="theme-vdoing-content content__default"><h1 id="译-复杂的报告定制"><a href="#译-复杂的报告定制" class="header-anchor">#</a> [译] 复杂的报告定制</h1> <p><a href="https://www.ranorex.com/help/latest/ranorex-studio-fundamentals/reporting/user-defined-reporting/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/OfficialPage-ClickMe-blue.svg?longCache=true&amp;style=flat-square" alt=""><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <p><a href="https://github.com/taylortaurus" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Translator-TaylorTaurus-42B983.svg?longCache=true&amp;style=flat-square" alt=""><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> <img src="https://img.shields.io/badge/TranslateTime-2018%E5%B9%B49%E6%9C%8825%E6%97%A5-green.svg?longCache=true&amp;style=flat-square" alt=""> <img src="https://img.shields.io/badge/UpdateTime-2019%E5%B9%B49%E6%9C%8810%E6%97%A5-green.svg?longCache=true&amp;style=flat-square" alt=""></p> <hr> <p>在本章中，您将找到有关如何执行一系列更复杂的报表自定义的说明。由于它们需要编码技能，因此您应该熟悉Ranorex Studio中的代码模块。</p> <blockquote><p><strong>章节预览</strong><br>
如果您不熟悉代码模块及其应用程序的概念，请参阅Ranorex Studio专家&gt;  👉<a href="/ranorex/pages/b31e73/">代码模块</a>。</p></blockquote> <p><strong>本章导视</strong></p> <ul><li><a href="#%E7%A4%BA%E4%BE%8B%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88">示例解决方案</a></li> <li><a href="#%E5%BA%94%E7%94%A8Ranorex%E6%A0%87%E5%87%86%E6%8A%A5%E5%91%8A%E7%B1%BB">应用Ranorex标准报告类</a></li> <li><a href="#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8A%A5%E5%91%8A%E7%AD%96%E7%95%A5">自定义报告策略</a></li> <li><a href="#%E7%94%A8%E6%88%B7%E5%AE%9A%E4%B9%89%E6%8A%A5%E5%91%8A%E7%BA%A7%E5%88%AB">用户定义报告级别</a></li> <li><a href="#%E8%AE%BE%E7%BD%AE%E5%BD%93%E5%89%8D%E6%8A%A5%E5%91%8A%E7%BA%A7%E5%88%AB">设置当前报告级别</a></li> <li><a href="#%E8%A6%86%E7%9B%96%E5%BD%93%E5%89%8D%E6%8A%A5%E5%91%8A%E7%BA%A7%E5%88%AB">覆盖当前报告级别</a></li> <li><a href="#%E6%8A%A5%E5%91%8A%E6%88%AA%E5%9B%BE">报告截图</a></li> <li><a href="#%E6%8A%A5%E5%91%8A%E7%B3%BB%E7%BB%9F%E6%91%98%E8%A6%81">报告系统摘要</a></li> <li><a href="#%E6%B7%BB%E5%8A%A0%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE">添加自定义数据</a></li> <li><a href="#%E5%BA%94%E7%94%A8%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE">应用自定义数据</a></li></ul> <h2 id="示例解决方案"><a href="#示例解决方案" class="header-anchor">#</a> 示例解决方案</h2> <p>本文介绍了用户定义的报告方法的概念，下述提供示例解决方案下载。</p> <p><strong>示例解决方案</strong></p> <blockquote><p>主题：用户定义报告<br>
时间：30min以内<br>
下载：<a href="https://www.ranorex.com/rx-media/rx-user-guide/latest/download/RxSampleUserDefinedReport.zip" target="_blank" rel="noopener noreferrer">点我下载<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></blockquote> <p><strong>安装</strong></p> <ol><li>解压项目目录到你的计算机任一文件夹</li> <li>使用RanorexStudi打开<code>Introduction.rxsln</code>解决方案</li></ol> <p><strong>贴士</strong><br>
示例解决方案适用于Ranorex版本8.0或更高版本。你需要将解决方案自动升级同意到8.2及更高版本的。</p> <h2 id="应用ranorex标准报告类"><a href="#应用ranorex标准报告类" class="header-anchor">#</a> 应用Ranorex标准报告类</h2> <p>在代码中创建报告消息的最简单方法是使用六种不同的标准报告类之一。</p> <h3 id="标准报告类"><a href="#标准报告类" class="header-anchor">#</a> <strong>标准报告类</strong></h3> <p>Ranorex Studio有六个标准报告类，如下所示。这些类对应于标准报告级别。</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Debug</span><span class="token punctuation">(</span>“<span class="token class-name">Debug</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Info</span><span class="token punctuation">(</span>“<span class="token class-name">Information</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Warn</span><span class="token punctuation">(</span>“<span class="token class-name">Warning</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Error</span><span class="token punctuation">(</span>“<span class="token class-name">Error</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Success</span><span class="token punctuation">(</span>“<span class="token class-name">Success</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token class-name">Ranorex<span class="token punctuation">.</span>Report<span class="token punctuation">.</span>Failure</span><span class="token punctuation">(</span>“<span class="token class-name">Failure</span> message”<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><ol><li>创建一个代码模块并打开它。</li> <li>在Run（）方法中添加标准报告类的类实例。</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000010.png" alt="A9060-0000010"> <em>应用Ranorex标准报告类</em></p> <ol start="3"><li>从测试套件运行代码模块并查看结果</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000020.png" alt="A9060-0000020"><br> <em>标准报告类的报告信息</em></p> <p><strong>贴士</strong></p> <blockquote><p>确保将测试套件的错误级别设置为“调试”级别，以显示所有标准报告消息。</p></blockquote> <h3 id="用户代码录制的报告"><a href="#用户代码录制的报告" class="header-anchor">#</a> 用户代码录制的报告</h3> <p>当然，除了可以在代码模块中应用用户定义的报告之外，还可以通过用户代码录制将它们添加到录制模块中。</p> <blockquote><p><strong>章节预览</strong><br>
如果您不熟悉用户代码录制及其应用程序的概念，我们建议您阅读 &gt; Ranorex Studio 基础教程 &gt; 动作 &gt; 👉 <a href="/ranorex/pages/1d68a8/">用户代码动作</a>章节</p></blockquote> <ol><li>切换到录制模块<code>Recording1</code>(在示例解决方案中)</li> <li>插入新的用户代码录制<code>ReportInformation()</code>，然后双击它以将其打开</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000030.png" alt="A9060-0000030"><br> <em>在录制模块中插入用户代码动作</em></p> <ol start="3"><li>将新报告信息消息添加到用户代码录制的构造函数中</li> <li>运行报告模块并在测试报告中查看报告消息</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000040.png" alt="A9060-0000040"><br> <em>在用户代码中添加报告信息</em></p> <h2 id="自定义报告策略"><a href="#自定义报告策略" class="header-anchor">#</a> 自定义报告策略</h2> <p>用户定义的报告消息的默认类别是“用户”。 此默认类别可以随意更改。</p> <h3 id="临时定义的自定义报告类别"><a href="#临时定义的自定义报告类别" class="header-anchor">#</a> 临时定义的自定义报告类别</h3> <ol><li>创建一个新的代码模块<code>CustomReportCategory</code>，或从示例解决方案中打开它</li> <li>打开代码模块并添加以下介绍的代码</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000050.png" alt="A9060-0000050"><br> <em>定义一个零时的自定义报告策略</em></p> <ol><li>使用临时定义的自定义报告类别创建报告消息</li> <li>创建第二个报告消息，不定义自定义报告类别</li></ol> <h3 id="结果"><a href="#结果" class="header-anchor">#</a> 结果</h3> <p>运行相应的代码模块并查看结果</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000060.png" alt="A9060-0000060"><br> <em>零时设置自定义报告策略</em></p> <ol start="3"><li>查看使用临时设置的自定义报告类别的报告消息</li></ol> <h3 id="永久定义的自定义报告类别"><a href="#永久定义的自定义报告类别" class="header-anchor">#</a> 永久定义的自定义报告类别</h3> <ol><li>创建一个新的代码模块<code>CustomReportCategory</code>，或者从示例解决方案中打开它</li> <li>打开代码模块并添加下面介绍的代码</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000070.png" alt="A9060-0000070"><br> <em>定义永久的自定义报告类别</em></p> <ol><li>定义永久的默认自定义报告类别</li> <li>创建报告消息</li></ol> <h3 id="结果-2"><a href="#结果-2" class="header-anchor">#</a> <strong>结果</strong></h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000080.png" alt="A9060-0000080"><br> <em>永久设置自定义报告类别</em></p> <ol start="3"><li>查看使用永久设置的自定义报告类别的报告消息</li></ol> <h2 id="用户定义报告级别"><a href="#用户定义报告级别" class="header-anchor">#</a> 用户定义报告级别</h2> <p>使用Ranorex，可以创建和应用具有名称和值的用户定义报表级别。在示例解决方案的代码模块<code>CustomReportLevel</code>中找到相应的示例。</p> <ol><li>定义两个用户定义的报告级别<code>MID</code>和<code>LOW</code></li> <li>将用户定义的报告级别应用于报告消息</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000090.png" alt="A9060-0000090"><br> <em>用户定义的报告级别</em></p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000100.png" alt="A9060-0000100"><br> <em>具有用户定义的报告级别的测试报告</em></p> <h3 id="结果-3"><a href="#结果-3" class="header-anchor">#</a> <strong>结果</strong></h3> <ol><li>查看测试报告中对应的报告信息</li> <li>相应地应用用户定义的报告级别</li></ol> <h3 id="格式化用户定义的报告级别"><a href="#格式化用户定义的报告级别" class="header-anchor">#</a> <strong>格式化用户定义的报告级别</strong></h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000110.png" alt="A9060-0000110"><br> <em>格式化用户定义的报告级别</em></p> <ol start="5"><li>在CSS格式语法中定义样式格式</li> <li>查看测试报告中格式化的结果</li></ol> <h2 id="设置当前报告级别"><a href="#设置当前报告级别" class="header-anchor">#</a> 设置当前报告级别</h2> <p>只有当报表级别高于或等于测试容器的报表级别时，报表信息才会出现在报表中。在示例解决方案的代码模块<code>CustomReportLevel</code>中找到相应的示例。</p> <ol><li>定义两种用户定义的报告级别</li> <li>设置当前的报告级别值为<code>MID</code>和更高</li> <li>通过创建具有不同报告级别的两个报告消息来应用该设置</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000120.png" alt="A9060-0000120"><br> <em>设置当前报告级别</em></p> <h3 id="结果-4"><a href="#结果-4" class="header-anchor">#</a> <strong>结果</strong></h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000130.png" alt="A9060-0000130"><br> <em>测试报告包含经过级别筛选的报告消息</em></p> <ol><li>测试报告中仅包含报告级别为MID或更高级别的报告消息</li></ol> <h2 id="覆盖当前报告级别"><a href="#覆盖当前报告级别" class="header-anchor">#</a> 覆盖当前报告级别</h2> <p>通过使用报告级别“始终”记录信息，可以始终覆盖当前报告级别。在示例解决方案的代码模块<code>CustomReportLevel</code>中找到相应的示例。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000140.png" alt="A9060-0000140"><br> <em>覆盖当前报告级别</em></p> <ol><li>定义两个用户定义的报表级别</li> <li>将当前报表级别设置为<code>MID</code>或更高</li> <li>通过创建两个报告消息来应用该设置，第二个消息覆盖当前报告级别</li></ol> <h3 id="结果-5"><a href="#结果-5" class="header-anchor">#</a> 结果</h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000150.png" alt="A9060-0000150"><br> <em>覆盖当前报告级别</em></p> <ol start="4"><li>看到第二个报告信息覆盖了当前的报告级别<code>MID</code></li></ol> <h2 id="报告截图"><a href="#报告截图" class="header-anchor">#</a> 报告截图</h2> <p>添加以下代码以将屏幕截图发送到报告。如果您未指定控件库项目，Ranorex Studio会截取代码执行时可见的内容。</p> <p><img src="https://www.ranorex.com/rx-media/rx-user-guide/v9.1/A90/A9060-0000160.png" alt="A9060-0000160"><br> <em>报告的桌面截图</em></p> <ol><li>添加用于将屏幕截图发送到测试报告的代码</li></ol> <blockquote><p><strong>章节预览</strong><br>
在 &gt; Ranorex Studio 专家教程 &gt; 👉 <a href="/ranorex/pages/b31e73/">代码模块</a>章节中介绍并解释了通过代码模块寻址控件库项目</p></blockquote> <h2 id="报告系统摘要"><a href="#报告系统摘要" class="header-anchor">#</a> 报告系统摘要</h2> <p>添加以下代码以在报告中显示系统摘要。</p> <p><img src="https://www.ranorex.com/rx-media/rx-user-guide/v9.1/A90/A9060-0000170.png" alt="A9060-0000170"><br> <em>报告系统摘要</em></p> <p>系统摘要在报告中显示为Info消息</p> <h2 id="添加自定义数据"><a href="#添加自定义数据" class="header-anchor">#</a> 添加自定义数据</h2> <p>在本节中，我们将向您展示如何在测试运行期间收集自定义数据以及如何将这些数据写入用于生成最终报告的XML测试数据文件中。</p> <h3 id="添加自定义数据到测试数据文件"><a href="#添加自定义数据到测试数据文件" class="header-anchor">#</a> 添加自定义数据到测试数据文件</h3> <p>触发定制数据收集是通过用户代码动作完成的，该动作具有待定义的方法并且负责跟踪定制数据。您可以在示例解决方案的代码模块<code>CustomData</code>中找到相应的示例。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000180.png" alt="A9060-0000180"> <em>生成自定义报告数据</em></p> <ol><li>活动堆栈对象定义
<ul><li>定义一个引用Ranorex当前活动堆栈的对象</li> <li>活动堆栈是测试运行期间通过堆栈数据结构收集所有活动的地方</li></ul></li> <li>将活动添加到“活动堆栈”
<ul><li>活动堆栈方法<code>CustomProperties</code>将一个报告的活动放到活动堆栈上</li> <li>该方法由一个自定义字段名(即'myName')和一个自定义字段值(即'myValue')定义，它们都是string类型的</li></ul></li></ol> <h3 id="结果-6"><a href="#结果-6" class="header-anchor">#</a> 结果</h3> <p>运行代码模块并查看测试报告。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000190.png" alt="A9060-0000190"><br> <em>在测试数据文件中的自定义报告数据</em></p> <ol start="3"><li>测试数据文件中的自定义数据
<ul><li>如果您在Ranorex报告生成之外应用测试数据，请随意以您需要的方式解析XML文件</li> <li>如果您需要将定制的测试数据包含在Ranorex标准报告中，请参阅下一节</li></ul></li></ol> <h2 id="应用自定义数据"><a href="#应用自定义数据" class="header-anchor">#</a> 应用自定义数据</h2> <p>如果您希望将XML测试数据文件中的自定义数据包含在Ranorex报告中，请按照此处的说明进行操作。</p> <blockquote><p><strong>章节预览</strong><br>
为了能够更改Ranorex标准报告的布局和内容，建议你对HTML，CSS，XSL和XML有基本的了解。 有关详细信息，请参阅<a href="/ranorex/pages/1d68a8/">www.w3.org</a>上的万维网联盟（W3C）</p></blockquote> <h3 id="自定义xsl文件"><a href="#自定义xsl文件" class="header-anchor">#</a> 自定义XSL文件</h3> <p>要在Ranorex报告中包含自定义数据，必须定制Ranorex报告的XSL规范。XSL规范的定制可以用任何XML编辑器完成，当然也可以用Ranorex Studio完成。您可以在示例解决方案的项目文件文件夹<code>/CustomDataTemplate/</code>中找到对应的XSL文件。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000200.png" alt="A9060-0000200"></p> <ol start="4"><li>识别测试数据文件中的字段对</li> <li>打印定制数据介绍(头)选项</li> <li>选择对应字段名称的字段值</li></ol> <h3 id="结果-7"><a href="#结果-7" class="header-anchor">#</a> 结果</h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/Reporting/A9060-0000210.png" alt="A9060-0000210"><br> <em>在测试报告中的自定义数据</em></p> <ol start="7"><li>根据XSL文件规范中的位置，Ranorex报告包含自定义数据</li></ol> <hr></div></div> <div class="page-slot page-slot-bottom"><!-- 横向自适应 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6620245489"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">11/26/2021, 2:14:10 PM</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/ranorex/pages/46ca5e/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">定制化报告</div></a> <a href="/ranorex/pages/c2560f/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">将报告转换为其他数据类型</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/ranorex/pages/46ca5e/" class="prev">定制化报告</a></span> <span class="next"><a href="/ranorex/pages/c2560f/">将报告转换为其他数据类型</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/ranorex/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/ranorex/pages/93ab6d/"><div>介绍</div></a> <span>11-22</span></dt></dl><dl><dd>02</dd> <dt><a href="/ranorex/pages/efb1ea/"><div>解决元素未找到错误</div></a> <span>11-22</span></dt></dl><dl><dd>03</dd> <dt><a href="/ranorex/pages/9be76e/"><div>添加解决方案设置到解决方案</div></a> <span>11-22</span></dt></dl> <dl><dd></dd> <dt><a href="/ranorex/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2021-2021
    <span></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <div class="custom-html-window custom-html-window-rb" style="display:;"><div class="custom-wrapper"><i class="close-but">×</i> <div><!-- 固定160*160px -->
      <ins class="adsbygoogle"
          style="display:inline-block;max-width:160px;max-height:160px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="8377369658"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script>
      </div></div></div></div><div class="global-ui"><div></div></div></div>
    <script src="/ranorex/assets/js/app.24b7eaa5.js" defer></script><script src="/ranorex/assets/js/2.ec9fdd2b.js" defer></script><script src="/ranorex/assets/js/57.cc924439.js" defer></script>
  </body>
</html>
